Field of the Invention
The present disclosure relates to synchronization. In particular, but not exclusively, the present disclosure relates to synchronizing flows in a packet-switched network
Description of the Related Technology
OpenFlow is a communications protocol that provides centralized control of the forwarding plane of a series of network switches or routers. A centralized controller node programs flow tables on the OpenFlow enabled switch which are used to control packet routing on the switch.
Flow tables contain sets of match parameters with associated actions. An individual flow is uniquely identified by a well-defined set of match parameters and a match priority. The match parameters are used to quantify packets arriving on the switch, for example the match parameters include ingress port and destination media access control (MAC) address. A packet arriving at the switch is matched against the highest priority flow and the actions associated with that flow are then performed on the packet, for example the action could be to route the packet to another port.
Management of the flow tables is handled by sending in OpenFlow commands with a set of match parameters and actions. Flows may be added, deleted or updated based on the request parameters. Bulk matching of flows can be handled by wildcarding the match parameters or the match priority. For example, to bulk delete a set of flows it is possible to send in a delete action with a set of exact match parameters and the remaining match parameters wildcarded; in this case, all flows matching the exact set of match parameters will be deleted.
In addition to the match parameters, the priority and the actions, each programmed flow can have a cookie assigned to it. This is an arbitrary 64-bit number that is chosen and programmed by the controller node. The cookie is not used to uniquely identify the flow. However, when performing flow matches for bulk queries and updates, the cookie value can (in addition to the match and match priority) be used to identify a group of flows. For example, it is possible to delete all flows with a cookie value of 1000. A cookie mask value allows a further restriction such that a match is made only on the masked cookie values. For example, it is possible to delete all flows whose lowest 3 bits are set to 110.
The controller node is responsible for calculating and programming which flows are configured on the switch. In the event of a connection failure (for example, a transient network glitch, a switch restart, a controller restart, etc.), the controller node must synchronize the flows that are programmed on the switch to ensure the switch is in the correct state when the switch reconnects.
Since there are large number of match parameters associated with a flow, there is a large amount of flow-matching code that needs to be implemented in the OpenFlow protocol stack. Implementing these matches, especially when taking into consideration wildcarded match parameters could potentially be error prone simply due to the large number of parameters. Furthermore, different versions of the OpenFlow specification, where there may be additional match parameters, further complicate this match processing.